import request from '@/utils/request'
class CommonModel {
  // 小店运费模板列表
  static getFreightTemplateByStore(storeId: string | number) {
    return request<any, any>({
      url: '/freight/getStoreFreightList',
      method: 'GET',
      params: { storeId }
    })
  }
  // 小店品牌列表
  static getBrandsByStore(storeId: string | number) {
    return request<any, any>({
      url: '/brand/getStoreBrandList',
      method: 'GET',
      params: { storeId }
    })
  }
  // 类目下拉
  static getCateDrop(params: any = {}) {
    return request<any, any>({
      url: '/category/getStoreCategory',
      method: 'GET',
      params
    })
  }
  // 供货渠道
  static async getSupplierList() {
    return request<any, any>({
      url: '/channel/all',
      method: 'POST'
    })
  }
  // 员工
  static async getEmplyeeList() {
    return request<any, any>({
      url: '/emp/all',
      method: 'GET'
    })
  }

  // 小店下拉
  static getStoresDrop(channelId?: any) {
    return request<any, any>({
      url: '/store/all',
      method: 'POST',
      data: { channelId }
    })
  }
}

export default CommonModel
